
$(function () {
    /*初始化*/
    init();
});
/*日期选择*/
// 仅选择日期
$(".form-date").datetimepicker(
    {
        language: "zh-CN",
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0,
        format: "yyyy-mm-dd"
});
function init(){
    $('#workTable,#workTable1,#workTable2').bootstrapTable({
        method : 'post',  //发送方式
        url : 'http://192.168.59.3:8082/console/projectmgt/query/worker/p1001',  // 接口路径 其他工人&明细数据为空
        onLoadSuccess : function (data) {
            console.log(data);
        }
    })
}
function responseHandler(res) {
    console.log(res);
    var needData = {
        rows: res.data.list,
        total: res.data.total
    };

    return needData;
}

function indexFmt(val,row,index){
    return index+1;
}

function workTableQuery(params){
    params["pageNum"] = (params.offset / params.limit) + 1;
    params.pageSize = params.limit;
    return params;
}



/*layer的iframe弹窗-添加交易*/

$('.add').on('click', function(){
    layer.open({
        type: 2,
        title: '',
        maxmin: true,
        shadeClose: true, //点击遮罩关闭层
        area : ['65%' , '40%'],
        content: 'add.html'
    });
});





